The _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy routine is called by the kernel to read and write blocks of
data on the block device. _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy may also be called directly or
indirectly (via a call to the _pppp_hhhh_yyyy_ssss_iiii_oooo_cccc_kkkk(D3) function) to support the raw
character interface of a block device from _rrrr_eeee_aaaa_dddd(D2), _wwww_rrrr_iiii_tttt_eeee(D2) or
_iiii_oooo_cccc_tttt_llll(D2). The _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy routine's responsibility is to set up and
initiate the data transfer.
RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
Ignored. Errors are returned by using the _bbbb_iiii_oooo_eeee_rrrr_rrrr_oooo_rrrr(D3) function to mark
the buffer as being in error. On systems where the _bbbb_iiii_oooo_eeee_rrrr_rrrr_oooo_rrrr function is
not available, errors can be returned by setting the _BBBB______EEEE_RRRR_RRRR_OOOO_RRRR flag in the
_bbbb______ffff_llll_aaaa_gggg_ssss field of the _bbbb_uuuu_ffff structure, and setting the error number in the
_bbbb______eeee_rrrr_rrrr_oooo_rrrr field of the _bbbb_uuuu_ffff structure.
UUUUSSSSAAAAGGGGEEEE
This entry point is required in all block device drivers.
Generally, the first validation test performed by the _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy routine is
to see if the I/O is within the bounds of the device. If the starting
block number, given by _bbbb_pppp_----_>>>>_bbbb______bbbb_llll_kkkk_nnnn_oooo, is less than 0 or greater than the
number of blocks on the device, the error number in the buffer header
should be set to _EEEE_NNNN_XXXX_IIII_OOOO, and the _BBBB______EEEE_RRRR_RRRR_OOOO_RRRR flag should be set in _bbbb_pppp_----
_>>>>_bbbb______ffff_llll_aaaa_gggg_ssss. If the _bbbb_iiii_oooo_eeee_rrrr_rrrr_oooo_rrrr routine is available, _bbbb_iiii_oooo_eeee_rrrr_rrrr_oooo_rrrr should be used
to set the buffer error number to _EEEE_NNNN_XXXX_IIII_OOOO. Then, the buffer should be
marked done by calling _bbbb_iiii_oooo_dddd_oooo_nnnn_eeee(D3), and the driver should return. If
_bbbb_pppp_----_>>>>_bbbb______bbbb_llll_kkkk_nnnn_oooo is equal to the number of blocks on the device and the
operation is a write, indicated by the absence of the _BBBB______RRRR_EEEE_AAAA_DDDD flag in _bbbb_pppp_----
_>>>>_bbbb______ffff_llll_aaaa_gggg_ssss (_!!!!_((((_bbbb_pppp_----_>>>>_bbbb______ffff_llll_aaaa_gggg_ssss _&&&& _BBBB______RRRR_EEEE_AAAA_DDDD_))))), then the same action should be taken.
However, if the operation is a read and _bbbb_pppp_----_>>>>_bbbb______bbbb_llll_kkkk_nnnn_oooo is equal to the
number of blocks on the device, then the driver should set _bbbb_pppp_----_>>>>_bbbb______rrrr_eeee_ssss_iiii_dddd
equal to _bbbb_pppp_----_>>>>_bbbb______bbbb_cccc_oooo_uuuu_nnnn_tttt, mark the buffer done by calling _bbbb_iiii_oooo_dddd_oooo_nnnn_eeee, and
return. This will cause the read to return 0.
Once the I/O request has been validated, the _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy routine should
queue the request. If there is not already a transfer under way, the I/O
is started. Then the _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy routine returns. When the I/O is
complete, the driver will call _bbbb_iiii_oooo_dddd_oooo_nnnn_eeee to free the buffer and notify
anyone who has called _bbbb_iiii_oooo_wwww_aaaa_iiii_tttt(D3) to wait for the I/O to finish.